<?php 

class AutoEcolesController extends AppController{


	public function index(){
		$this->layout = 'backend' ; 

		if(!empty($this->request->data)){
			//debug($this->request->data); 
			$categories = serialize($this->request->data['AutoEcole']['cathegoriePermis']);
			print_r($categories);
			if($this->AutoEcole->save($this->request->data)){
				$this->Session->setFlash("Les modifictations ont été enregistrés", 'default' , array('class' => 'alert alert-success'));
			}else{
				$this->Session->setFlash("Les informations n'ont pas été enregistrés", 'default' , array('class' => 'alert alert-error'));
			} 
		}

	}

}

 ?>